package com.wuwei.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @description: OrderController <br>
 * @date: 2021/2/8 11:49 <br>
 * @author: wuwei666 <br>
 * @version: 1.0 <br>
 */
@RestController
@Slf4j
public class OrderController {

    private String CONSUL_URL = "http://provider-consul-8005";

    @Autowired
    private RestTemplate restTemplate;

    @RequestMapping("/order/consul")
    public String orderConsul(){
        return restTemplate.getForObject(CONSUL_URL + "/payment/consul",String.class);
    }
}
